package oktx.sample.dubbo;

import oktx.sample.dubbo.model.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by dave on 18-5-20 上午10:44.
 */
@Mapper
public interface UserMapper {
    @Insert("insert into user(name, phone) value (#{name}, #{phone})")
    @Options(useGeneratedKeys = true)
    int insert(User user);

    @Select("select * from user")
    List<User> getList();

    @Update("truncate table user")
    int clear();
}
